import axios from 'axios'

import Vue from 'vue'
let vm = new Vue();
export const downloadQr=(params)=>{
    return axios.request({
        url:"/comm/file/downloadbase64",
        params,
        method: 'get'
    })
}
export const uploadBase64Img=(params)=>{
    return axios.request({
        url:`comm/file/sfilebase64oss`,
        data:params,
        method: 'post',
    })
}

//上传图片
export const uploadImg = params => {
    return axios.request({
        url:`comm/file/muploadoss`,
        data:params,
        method: 'post',
    })
}

export const getALiYunOSSToken=(params)=>{
    console.log(params,'getALiYunOSSToken');
    return axios.request({
        url:vm.baseUrl+"/vapi/comm/ossToken.do",
        params,
        method: 'get'
    })
}
export const getCOSToken=(params)=>{
    console.log(params,'getCOSToken');
    return axios.request({
        url:"http://115.182.9.167/vapi/comm/cosToken.do",
        params,
        method: 'get'
    })
}
